/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */
#ifndef PLOSDEFINES_H
#define PLOSDEFINES_H

namespace PLSDK {

/**
 * Is the OS a 32 bit OS or a 64 bit OS.<br>
 * Defines that exists are:<br>
 * PL_OS_32BIT<br>
 * PL_OS_64BIT
 */
#if defined(__LP64__)
#  define PL_OS_64BIT
#elif defined(_WIN64)
#  define PL_OS_64BIT
#else
#  define PL_OS_32BIT
#endif

/**
 * The OS we are running on.<br>
 * Defines that exists are:<br>
 * PL_OS_DARWIN<br>
 * PL_OS_BSD4<br>
 * PL_OS_FREEBSD<br>
 * PL_OS_NETBSD<br>
 * PL_OS_OPENBSD<br>
 * PL_OS_BSDI<br>
 * PL_OS_CYGWIN<br>
 * PL_OS_WIN<br>
 * PL_OS_LINUX<br>
 * PL_OS_MAC<br>
 * PL_OS_UNIX
 */
#if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
#  define PL_OS_DARWIN
#  define PL_OS_BSD4
#elif defined(__CYGWIN__)
#  define PL_OS_CYGWIN
#elif !defined(SAG_COM) && (defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64) || defined(__WIN64__) || defined(__WIN32__) || defined(__NT__))
#  define PL_OS_WIN
#elif defined(__linux__) || defined(__linux)
#  define PL_OS_LINUX
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#  define PL_OS_FREEBSD
#  define PL_OS_BSD4
#elif defined(__NetBSD__)
#  define PL_OS_NETBSD
#  define PL_OS_BSD4
#elif defined(__OpenBSD)
#  define PL_OS_OPENBSD
#  define PL_OS_BSD4
#elif defined(__bsdi__)
#  define PL_OS_BSDI
#  define PL_OS_BSD4
#endif

#if defined(PL_OS_DARWIN)
#  define PL_OS_MAC
#endif

#if !defined(PL_OS_WIN)
#  define PL_OS_UNIX
#endif

}

#endif
